<!DOCTYPE html>
<html lang="en">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>自营产品</title>
    <link rel="icon" ty type="image/svg+xml" href="/static/pc/images/favicon.ico" />
    <link rel="stylesheet" type="text/css" href="/static/pc/css/main.css?time=202311201438"/>
    <script type="text/javascript" src="/static/js/lib/jquery.min.js"></script>
    <script type="text/javascript" src="/static/js/lib/jquery.pagination.js"></script>
    <script type="text/javascript" src="/static/pc/js/main.js?time=202311201438"></script>
</head>
<body>

<div th:replace="${route}+'inc/header'::header('self',1)"/>

<div class="page-banner-container" th:if="${bannerList!=null && bannerList.size>0}">
    <img src="images/inner-banner.png" th:src="${website+'/'+bannerList.get(0).img}">
</div>


<div class="breadcrumb-box">
    <div class="container-box"><span class="loaction">当前位置:</span><a href="/">首页</a><a href="/self.html">自营产品</a></div>
</div>
<div class="pages-container">
    <div class="product-list-box" th:style="'min-height:'+${productTypeList.size*65+240}+'px'">
        <div class="product_type_list">
            <ul class="type_title_box">
                <li>产品分类</li>
                <li>ALL PRODUCTS</li>
            </ul>
            <ul class="type_list_box" th:if="${productTypeList!=null}">
                <li th:each="item:${productTypeList}">
                    <a th:href="${item.url}" th:class="${(upId==item.id)?'active':''}" th:text="${item.name}"></a>
                </li>
            </ul>
            <ul class="link_box">
                <li><p>咨询电话：</p>
                    <p th:text="${company.deptName2}"></p>
                </li>
            </ul>
        </div>
        <div class="product_item_list" th:if="${productSubTypeList!=null}">
            <div class="child_type_box">
                <a th:class="${(typeId=='' || typeId==null)?'active':''}" th:href="${allList}">所有产品</a>
                <a th:class="${(typeId==item.id)?'active':''}" th:each="item:${productSubTypeList}"
                   th:text="${item.name}" th:href="${item.url}"></a>
            </div>

            <div class="item_list_box" th:if="${productList!=null}">
                <div class="item_box" th:each="item:${productList}">
                    <a th:href="${item.detailUrl}">
                        <ul>
                            <li><img th:src="${website+'/'+item.smallImg}"></li>
                            <li>
                                <p th:text="${item.name}"></p>
                                <p>
                                    <span th:text="${'型号：'+item.spec}"></span>
                                    <span th:text="${item.packing}"></span>
                                </p>
                            </li>
                        </ul>
                    </a>
                </div>
            </div>
            <div class="pages-box" id="pages"></div>
        </div>
    </div>
</div>
<div th:replace="${route}+'inc/footer'::footer('self')"/>
</body>
<script type="text/javascript">
    var current = [[${page.currentPage}]]
    var total = [[${page.totalPage}]]
    var typeId = '[[${typeId}]]'
    var upId = '[[${upId}]]'
    var keyword = '[[${keyword}]]'
    current = current == 0 ? 1 : current
    total = total == 0 ? 1 : total
    $('#pages').pagination({
        totalData: total,
        current: current,
        showData: 5,
        coping: true,
        // homePage: '首页',
        // endPage: '末页',
        prevContent: '&lt;',
        nextContent: '&gt;',
        callback: function (api) {
            var url = api.getCurrent() + ".html";
            if (typeId != "" && typeId != null) {
                url = typeId + "/" + url;
            }
            if (upId != "" && upId != null) {
                url = upId + "/" + url;
            }
            $("#searchForm").attr("action","/product_list/" + url)
            $("#keyword").val(keyword);
            $("#searchForm").submit();


        }
    }, function (api) {

    });</script>
</html>